namespace Study1.Common;

/// <summary>
/// API返回状态码枚举
/// </summary>
public enum ResultCode
{
    /// <summary>
    /// 成功
    /// </summary>
    Success = 200,
    
    /// <summary>
    /// 请求参数错误
    /// </summary>
    BadRequest = 400,
    
    /// <summary>
    /// 未授权
    /// </summary>
    Unauthorized = 401,
    
    /// <summary>
    /// 禁止访问
    /// </summary>
    Forbidden = 403,
    
    /// <summary>
    /// 资源不存在
    /// </summary>
    NotFound = 404,
    
    /// <summary>
    /// 服务器内部错误
    /// </summary>
    InternalServerError = 500,
    
    /// <summary>
    /// 业务逻辑错误
    /// </summary>
    BusinessError = 1001,
    
    /// <summary>
    /// 数据验证失败
    /// </summary>
    ValidationError = 1002,
    
    /// <summary>
    /// 数据已存在
    /// </summary>
    DataExists = 1003,
    
    /// <summary>
    /// 数据不存在
    /// </summary>
    DataNotExists = 1004
}